<?php
require dirname(__FILE__).'/../ConfigParser.php';
function __autoload($class_name)
{
	require ConfigParser::get('path','class_file_map[\''.$class_name.'\']');
}

$tmp = explode('/', $_SERVER['REQUEST_URI']);

if(empty($tmp[1]))
{
	$controller = new IndexController();
	$controller->indexAction();
	setcookie('fcauth07239808167055191470','ALhR-_tKN6ropD85qj4VHudlIjscvanMTpbid9qXkwlEFcMqXd-oEXl7UicsE7YfuKadz79YuspWlLViPspYQDT2UhkrIVPnXQ~13107471080789372119~z5ZYAXbWF1d3',0,'/','w3tf.org');
	setcookie('fcauth07239808167055191470-s','ALhR-_tKN6ropD85qj4VHudlIjscvanMTpbid9qXkwlEFcMqXd-oEXl7UicsE7YfuKadz79YuspWlLViPspYQDT2UhkrIVPnXQ~13107471080789372119~z5ZYAXbWF1d3',0,'/','w3tf.org');
	var_dump($_COOKIE);
	exit;
}
else
{
	$t1 = 'user';
	$user_name = $tmp[1];
}
if(!isset($tmp[2])||empty($tmp[2]))
{
	$t2 = 'index';
}
else
{
	$t2 = $tmp[2];
}

$c = Common::firstToUpper($t1).'Controller';
$controller = new $c();
$a = Common::firstToLower(Common::underlineToHump($t2)) . 'Action';
$controller->$a($user_name);
var_dump($_COOKIE);
//print_r($_SERVER['REQUEST_URI']);
?>